﻿//using Microsoft.Extensions.Logging;
//using Surging.Core.CPlatform;
//using Surging.Core.CPlatform.Module;
//using Surging.Core.CPlatform.Utilities;
//using System;
//using System.Collections.Generic;
//using System.Text;
//using Ubiquity.Core.Log.NLogger;

//namespace Surging.Core.Nlog
//{
//    public class NLogModule : EnginePartModule
//    {
//        private string nlogConfigFile = "${LogPath}|NLog.config";
//        /// <summary>
//        /// 
//        /// </summary>
//        /// <param name="serviceProvider">服务提供者</param>
//        public override void Initialize(CPlatformContainer serviceProvider)
//        {
//            var section = AppConfig.GetSection("Logging");
//            nlogConfigFile = EnvironmentHelper.GetEnvironmentVariable(nlogConfigFile);
//            NLog.LogManager.LoadConfiguration(nlogConfigFile);
//            serviceProvider.GetInstances<ILoggerFactory>().AddProvider(new NLogProvider());
//        }

//        /// <summary>
//        /// Inject dependent third-party components
//        /// </summary>
//        /// <param name="builder"></param>
//        protected override void RegisterBuilder(ContainerBuilderWrapper builder)
//        {
//            base.RegisterBuilder(builder);
           
//        }
//    }
//}
